package edu.sctu.practice.class02.shuqiqi.test12;

/**
 * Created by admin on 2015/10/18.
 */
public class Car {
    int tyrenumbers;
    String color;
    double weight;

    public Car(int tyrenumbers, String color, double weight) {
        this.color = color;
        this.tyrenumbers = tyrenumbers;
        this.weight = weight;
    }

    public void println() {
        System.out.println("颜色:" + color + "\n重量:" + weight + "\n轮胎个数:" + tyrenumbers);
    }

    public void SpeedUp() {
        System.out.println("汽车能够加速");
    }

    public void SpeedDown() {
        System.out.println("汽车能够减速");
    }

    public void Park() {
        System.out.println("汽车能够停车");
    }

    public static void main(String[] args) {
        Car car = new Car(47, "红色", 5.8);
        car.SpeedDown();
        car.SpeedUp();
        car.Park();
        car.println();

    }
}


